<template>
  <div class="detailContainer">
    <div class="top">
      <div class="left">
        <div class="title">{{ propertiesDetail.title }}</div>
        <div class="content">
          {{ propertiesDetail.desc }}
          <div class="btn-line">
            <div class="btn">MORE</div>
          </div>
        </div>
      </div>
      <div class="right"><img :src="propertiesDetail.image" alt="" /></div>
    </div>
    <div class="bottom">
      <img v-for="item in propertiesDetail.photos" :key="item" :src="item" alt="" />
    </div>
  </div>
</template>
<script>
import { getPropertyDetail } from '@/api/page'
export default {
  data() {
    return {
      propertiesDetail: ''
    }
  },
  created() {
    this.getPropertyDetail()
  },
  methods: {
    // 获取房产
    async getPropertyDetail() {
      const res = await getPropertyDetail(this.$route.query.id)
      // console.log(28, res)
      this.propertiesDetail = res.data
    }
  }
}
</script>
<style lang="scss" scoped>
.el-card {
  margin: 10px auto;
  width: 70%;
}
.middle {
  display: flex;
  justify-content: space-between;

  .middle-left {
    width: 55%;
  }
  .middle-right {
    width: 35%;
  }
}
</style>

<style lang="scss" scoped>
.detailContainer {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin: 30px;
  .top {
    display: flex;
    justify-content: space-between;
    height: 300px;
    .left {
      padding-left: 80px;
      padding-top: 50px;
      // display: flex;
      // align-items: center;
      .title {
        font-size: 24px;
        display: inline-block;
        //  border: 1px solid #000;
        vertical-align: top;
        margin-right: 50px;
      }
      .content {
        padding: 0 20px;
        display: inline-block;
        // border: 1px solid #000;
        width: 65%;
        .btn-line {
          margin-top: 30px;
          .btn {
            display: inline-block;
            border: 1px solid gray;
            padding: 4px 10px;
          }
        }
      }
    }
    .right {
      img {
        width: 600px;
        height: 300px;
      }
    }
  }
  .bottom {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    img {
      width: 300px;
    }
  }
}
</style>
